# 
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.22
# 
# >> macros
# << macros

Name:       pinball
Summary:    Emilia arcade game
Version:    0.0.0
Release:    0
Group:      Amusements/Games
License:    GPL+
URL:        http://pinball.sourceforge.net
Source0:    http://downloads.sourceforge.net/pinball/%{name}-%{version}.tar.gz
Source1:    %{name}.desktop
Source2:    %{name}.png
Source100:  pinball.yaml
Requires:   hicolor-icon-theme
Requires:   opengl-games-utils
Requires(post): /bin/touch
Requires(post): gtk2
BuildRequires:  libXt-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  libpng-devel
BuildRequires:  libvorbis-devel
BuildRequires:  libtool-ltdl-devel
BuildRequires:  desktop-file-utils


%description
The Emilia Pinball project is an open source pinball simulator for linux
and other unix systems. The current release is a stable and mature alpha.
There is only one level to play with but it is however very addictive.




%prep
%setup -q -n %{name}-%{version}

# >> setup
[ -e configure ] || ./bootstrap
# << setup

%build
# >> build pre
# << build pre

%configure --disable-static
make %{?jobs:-j%jobs}

# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%make_install

# >> install post
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications

install -d %{buildroot}%{_libdir}/%{name}/
install ./data/tux/libModuleTux.la  %{buildroot}%{_libdir}/%{name}/
install ./data/professor/libModuleProfessor.la  %{buildroot}%{_libdir}/%{name}/


# remove unused global higescorefiles:
rm -fr $RPM_BUILD_ROOT%{_localstatedir}
# remove unused test module
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/libModuleTest.*
# .la files are needed for ltdl
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib*.{a,so}
# remove bogus development files
rm -f $RPM_BUILD_ROOT%{_bindir}/%{name}-config
rm -rf $RPM_BUILD_ROOT%{_includedir}/%{name}
# << install post
desktop-file-install  \
  --dir %{buildroot}%{_datadir}/applications             \
  %{SOURCE1}


%post
/bin/touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache \
  --quiet %{_datadir}/icons/hicolor 2> /dev/null|| :

%postun
/bin/touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache \
  --quiet %{_datadir}/icons/hicolor 2> /dev/null|| :


%files
%defattr(-,root,root,-)
# >> files
#doc README ChangeLog
%{_bindir}/%{name}
%{_libdir}/%{name}
%{_libdir}/%{name}/lib*.la
%{_datadir}/%{name}
%{_datadir}/applications/*.desktop
#/var/games/%{name}/*/*
#%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
# << files


